package com.bsdsma.fengheguaiapp.restcontroller;


import com.bsdsma.fengheguaiapp.dto.ServiceInfoSearchDto;
import com.bsdsma.fengheguaiapp.service.RoomService;
import com.bsdsma.fengheguaiapp.service.RoominfoService;
import com.bsdsma.fengheguaiapp.service.ServiceInfoService;
import com.bsdsma.fengheguaiapp.utils.ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


/**
 * 房间类型模块对外暴露api入口, 即可通过http请求访问到下面各个方法
 */
@RestController
@RequestMapping(value = "/api/room")
public class RoomListController {
    @Autowired
    private ServiceInfoService serviceInfoService;  // 需要创建对应的Service类

    @GetMapping("/types")

    public Map<String, Object> getRoomTypes() {
        return ResultUtils.ok(serviceInfoService.getRoomTypes());
    }
}
